<nz-spin [nzSpinning]="isSpinning">
  <form nz-form [formGroup]="validateForm">

    <nz-collapseset>
      <nz-collapse [nzTitle]="'单位信息'" [nzActive]="true" [nzDisabled]="false">
        <div nz-form-item nz-row>
          <div nz-form-label nz-col [nzSm]="3" [nzXs]="3">
            <label>使用单位</label>
          </div>

          <div nz-form-control nz-col [nzSm]="8" [nzXs]="8" nzHasFeedback>
            <nz-select *ngIf="partyType==2"  [(ngModel)]="userBy" formControlName="maintenanceUserFirst" nzAllowClear [nzPlaceHolder]="partyBean.partyName" [nzShowSearch]="true"
                       name="maintenanceUserFirst" >
              <nz-option *ngFor="let user of userPartyList" [nzLabel]="user.partyName" [nzValue]="user.id"
                         [nzDisabled]="user.disabled">
              </nz-option>
            </nz-select>

            <nz-select *ngIf="partyType !=2"  formControlName="maintenanceUserFirst" nzAllowClear [nzPlaceHolder]="'请选择'" [nzShowSearch]="true"
                       name="maintenanceUserFirst"  nzDisabled>
            </nz-select>

          </div>


          <div nz-form-label nz-col [nzSm]="3" [nzXs]="3">
            <label>维保单位</label>
          </div>
          <div nz-form-control nz-col [nzSm]="8" [nzXs]="8" nzHasFeedback>

            <nz-select *ngIf="partyType !=1"  formControlName="maintenancePartyId" nzAllowClear [nzPlaceHolder]="'请选择'"
                       [nzShowSearch]="true" name="maintenancePartyId" [(ngModel)]="maintenance" (ngModelChange)="getChange()" >
              <nz-option  *ngFor="let option of maintenancePartyList" [nzLabel]="option.partyName" [nzValue]="option.id"
                          [nzDisabled]="option.disabled" >
              </nz-option>
            </nz-select>

            <nz-select *ngIf="partyType ==1"  formControlName="maintenanceUserFirst" nzAllowClear [nzPlaceHolder]="'请选择'" [nzShowSearch]="true"
                       name="maintenanceUserFirst"  nzDisabled>
            </nz-select>

          </div>
        </div>
      </nz-collapse>
    </nz-collapseset>


    <nz-collapseset>
      <nz-collapse [nzTitle]="'人员信息'" [nzActive]="true" [nzDisabled]="false">
        <div nz-form-item nz-row>
          <div nz-form-label nz-col [nzSm]="3" [nzXs]="3">
            <label>维保人员1</label>
          </div>
          <div nz-form-control nz-col [nzSm]="8" [nzXs]="8">
            <nz-select formControlName="maintenanceUserFirst" [(ngModel)]="maintenance1" nzAllowClear
                       [nzPlaceHolder]="'请选择'" [nzShowSearch]="true" name="maintenanceUserFirst">
              <nz-option *ngFor="let option of weibaoren" [nzLabel]="option.userName" [nzValue]="option.id"
                         [nzDisabled]="option.disabled">
              </nz-option>
            </nz-select>
          </div>
          <div nz-form-label nz-col [nzSm]="3" [nzXs]="3">
            <label>维保人员2</label>
          </div>
          <div nz-form-control nz-col [nzSm]="8" [nzXs]="8" nzHasFeedback>
            <nz-select formControlName="maintenanceUserSecond" nzAllowClear [nzPlaceHolder]="'请选择'"
                       [nzShowSearch]="true" name="maintenanceUserSecond" [(ngModel)]="maintenance2">
              <nz-option *ngFor="let option of weibaoren" [nzLabel]="option.userName" [nzValue]="option.id"
                         [nzDisabled]="option.disabled">
              </nz-option>
            </nz-select>
          </div>
        </div>
      </nz-collapse>
    </nz-collapseset>

    <div nz-form-item nz-row style="margin-bottom:8px;">
      <div nz-form-control nz-col [nzSpan]="8" [nzOffset]="11">
        <button nz-button [nzSize]="'large'" [nzType]="'primary'" (click)="doSubmin($event)">提交
        </button>
      </div>
    </div>
  </form>
</nz-spin>
